﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/SystemManagement/Views/Shared/LigerUI.Master"
    Inherits="System.Web.Mvc.ViewPage<Zhuang.Model.EF.Sys_User>" %>

<asp:Content ID="Content3" ContentPlaceHolderID="TitleContent" runat="server">
    系统管理
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <script language="javascript" type="text/javascript">


    //begin公共方法
        function f_closeWindow(frame)
         { 
             for (var i = 0; i < document.frames.length; i++)
             {
                 if (document.frames[i] == frame)
                 { 
                     $(".l-window[framename=" + document.frames[i].name + "]").remove();
                     return;
                 }
             }
         }
         function f_openWindow(url, title,width, height)
         {
             //return $.ligerWindow.show({ width: width, height: height, left: 200, top: 20, title: title, url: url });
             return $.ligerDialog.open({ url: url,width: width, height: height, left: 200, top: 20, title: title, modal: true });
         }
         function f_open(url)
         {
             $.ligerWindow.show({ width: 300, height: 300,left:100,top:100, title: '我的标题', url: url });
             //$.ligerDialog.open({ url: url, width: 300, height: 300,left:100,top:100, modal: false });
         }
         function f_openWithContent(content)
         {
             var chtml = "<div style='padding:10px'>" + content + "</div>";
             $.ligerWindow.show({ width: 300, height: 300, left: 200, top: 200, title: '我的标题', content: chtml });
         }
         //end公共方法


            var tab;
            var lo;
            function f_addTab(tabid,text, url)
            { 
                
                tab.addTabItem({ tabid : tabid,text: text, url: url });


            } 

            function f_heightChanged(options)
            {

                if (tab)
                    tab.addHeight(options.diff);
//                if (accordion && options.middleHeight - 24 > 0)
//                    accordion.setHeight(options.middleHeight - 24);


            }


            $(function () {



                //布局
                $("#layout1").ligerLayout({ leftWidth: 190, height: '100%',space:4, onHeightChanged: f_heightChanged });
 


//                lo=$("#layout1").ligerLayout({
//                minLeftWidth:80,
//                minRightWidth:80,
//                leftWidth:150,
//                onHeightChanged: f_heightChanged 
//                });


                var height = $(".l-layout-center").height();

                $("#accordion1").ligerAccordion({ height: height-24});

                
                //Tab
                $("#framecenter").ligerTab({ height: height });
                tab = $("#framecenter").ligerGetTabManager();

                //菜单树1
                tree = $("#tree1").ligerTree(
                {
                    data: <%=ViewData["systemMenu"] %>,
                    checkbox:false,  
                    //nodeWidth:100,
                    parentIcon: null, 
                    childIcon: null,
                    idFieldName :'menuId',
                    parentIDFieldName :'parentId',
                    onSelect: function (node)
                    {
                        if(!node.data)return;
                        if (!node.data.url) return;
                        var tabid = $(node.target).attr("tabid");
                        if (!tabid)
                        {
                            tabid = new Date().getTime();
                            $(node.target).attr("tabid", tabid)
                        } 
                        f_addTab(tabid, node.data.text, node.data.url+"?menuId="+node.data.menuId);
                    }

                })

            })
    </script>
    <style type="text/css">
        body, html
        {
            height: 100%;
        }
        body
        {
            padding: 0px;
            margin: 0;
            overflow: hidden;
        }
        .l-link
        {
            display: block;
            height: 26px;
            line-height: 26px;
            padding-left: 10px;
            text-decoration: underline;
            color: #333;
        }
        .l-link2
        {
            text-decoration: underline;
            color: white;
            margin-left: 2px;
            margin-right: 2px;
        }
        .l-layout-top
        {
            background: #102A49;
            color: White;
        }
        .l-layout-bottom
        {
            background: #E5EDEF;
            text-align: center;
        }
        #pageloading
        {
            position: absolute;
            left: 0px;
            top: 0px;
            background: white url('loading.gif') no-repeat center;
            width: 100%;
            height: 100%;
            z-index: 99999;
        }
        .l-link
        {
            display: block;
            line-height: 22px;
            height: 22px;
            padding-left: 16px;
            border: 1px solid white;
            margin: 4px;
        }
        .l-link-over
        {
            background: #FFEEAC;
            border: 1px solid #DB9F00;
        }
        .l-winbar
        {
            background: #2B5A76;
            height: 30px;
            position: absolute;
            left: 0px;
            bottom: 0px;
            width: 100%;
            z-index: 99999;
        }
        .space
        {
            color: #E7E7E7;
        }
        /* 顶部 */
        .l-topmenu
        {
            margin: 0;
            padding: 0;
            height: 31px;
            line-height: 31px;
            background: url('lib/images/top.jpg') repeat-x bottom;
            position: relative;
            border-top: 1px solid #1D438B;
        }
        .l-topmenu-logo
        {
            color: #E7E7E7;
            padding-left: 35px;
            line-height: 26px;
            background: url('lib/images/topicon.gif') no-repeat 10px 5px;
        }
        .l-topmenu-welcome
        {
            position: absolute;
            height: 24px;
            right: 30px;
            top: 0px;
            color: #070A0C;
        }
        .l-topmenu-welcome a
        {
            color: #070A0C;
            text-decoration: underline;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div id="topmenu" class="l-topmenu">
        <div class="l-topmenu-logo">
            权限管理系统 LigerRightManager</div>
        <div class="l-topmenu-welcome">欢迎您：
            <span>
                <%=Model.Name %></span>
            &nbsp; [<a href="javascript:f_changepassword()">修改密码</a>] &nbsp; [<a href='<%=Url.Action("Index","Login")%>'>切换用户</a>]
            [<a href='<%=Url.Action("Logout","Login")%>'>退出</a>]
        </div>
    </div>
    <div id="layout1">
        <div position="left">
            <div id="accordion1">
                <div title="功能列表">
                    <ul id="tree1">
                    </ul>
                </div>
                <div title="列表">
                    <ul>
                        <li>列表一</li>
                        <li>列表二</li>
                        <li>列表三</li>
                        <li>列表四</li>
                        <li>列表五</li>
                    </ul>
                </div>
                <div title="其他" style="padding: 10px">
                    其他内容
                </div>
            </div>
        </div>
        <div position="center" id="framecenter">
            <div tabid="home" title="我的主页">
                <iframe frameborder="0" name="home" id="home" src='<%=Url.Action("Welcome", "Index")%>'>
                </iframe>
            </div>
        </div>
        <%--        <div position="right">
        </div>
        <div position="top">
        </div>
        <div position="bottom">
        </div>--%>
    </div>
</asp:Content>
